package cn.edu.sdjzu.xg.eagle.service;

import cn.edu.sdjzu.xg.eagle.entity.Department;
import cn.edu.sdjzu.xg.eagle.entity.School;
import cn.edu.sdjzu.xg.eagle.exception.BaseException;

import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.Collection;

/**
 * @author tg.si@188.com
 * @project xg23
 * @date 2025/3/27
 */
public interface DepartmentService {
    Collection<Department> findAll() throws SQLException, BaseException, InvocationTargetException;
    Collection<Department> getAll(School school) throws SQLException, BaseException, InvocationTargetException;
    int countAll(School school) throws SQLException, BaseException;

    boolean add(Department department) throws SQLException, BaseException;
    boolean delete(Integer id) throws SQLException, BaseException;

    boolean delete(Department department) throws SQLException, BaseException;

    Department find(Integer id) throws SQLException, BaseException, InvocationTargetException;

}
